﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// Pour en savoir plus sur le modèle d'élément Contrôle utilisateur, consultez la page http://go.microsoft.com/fwlink/?LinkId=234236

namespace BlipSansBlop
{
    public sealed partial class DebugControl : UserControl
    {
        public static DebugControl Instance { get; set; }
        public DebugControl()
        {
            this.InitializeComponent();
            DebugControl.Instance = this;
        }

        public static void Update()
        {
            DebugControl.Instance.X.Text = Joystick.PositionX.ToString();
            DebugControl.Instance.X1.Text = Joystick.RapportPositionX.ToString();
            DebugControl.Instance.Y.Text = Joystick.PositionY.ToString();
            DebugControl.Instance.Y1.Text = Joystick.RapportPositionY.ToString();

            DebugControl.Instance.Distance.Text = Joystick.Distance.ToString();
            DebugControl.Instance.Rapport_Distance.Text = Joystick.RapportDistance.ToString();

            DebugControl.Instance.Angle_en_degree.Text = Joystick.AngleEnDegre.ToString();
            DebugControl.Instance.Angle_en_radian.Text = Joystick.AngleEnRadian.ToString();

            DebugControl.Instance.BoutonZ.Text = Joystick.ZPressed.ToString();
            DebugControl.Instance.BoutonS.Text = Joystick.SPressed.ToString();
            DebugControl.Instance.BoutonD.Text = Joystick.DPressed.ToString();
            DebugControl.Instance.BoutonQ.Text = Joystick.QPressed.ToString();

            DebugControl.Instance.BoutonA.Text = BlipSansBlop.BoutonA.OPressed.ToString();
            DebugControl.Instance.BoutonB.Text = BlipSansBlop.BoutonB.KPressed.ToString();
        }
    }
}
